import request from '@/utils/request'

const IMPORT_ACTION = '/node/importNode'

export default {
  action() {
    return IMPORT_ACTION
  },

  getPages(args) {
    return request.doGet('/node/getList', args)
  },

  getReceiveList(args) {
    return request.doGet('/node/getReceiveList', args)
  },

  getById(args) {
    return request.doGet('/node/getById', args)
  },

  getById4Ids(args) {
    return request.doGet('/node/getAllById', args)
  },

  add(args) {
    return request.doPost('/node/add', args)
  },

  edit(args) {
    return request.doPost('/node/edit', args)
  },

  deleteById(args) {
    return request.doGet('/node/deleteById', args)
  },

  deleteByIds(args) {
    return request.doGet('/node/deleteByIds', args)
  },

  receive(args) {
    return request.doGet('/node/receive', args)
  },

  completeNode(args) {
    return request.doGet('/node/completeNode', args)
  },

  destroyNode(args) {
    return request.doGet('/node/destroyNode', args)
  },

  getTypeList(args) {
    return request.doGet('/node/getTypeList', args)
  },

  publishOperation(args) {
    return request.doGet('/node/publishOperation', args)
  },

  saveNodeSxrl(args) {
    return request.doPost('/node/sx/rl/save', args)
  },

  getNodeSxrlByDate(args) {
    return request.doGet('/node/sx/rl/getByDate', args)
  },

  saveNodeSxyb(args) {
    return request.doPost('/node/sx/ybwd/save', args)
  },
  exportNode(args) {
    return request({
      url: '/node/exportNode',
      method: 'post',
      responseType: 'blob',
      args
    })
  },
  getNodeSxybByDate(args) {
    return request.doGet('/node/sx/ybwd/getByDate', args)
  },
  saveNodeSxJyzb(args) {
    return request.doPost('/node/sx/jyzb/save', args)
  },

  getNodeSxJyzbByDate(args) {
    return request.doGet('/node/sx/jyzb/getByDate', args)
  },

  getLightupMatterLamp(args) {
    return request.doGet('/node/getLightupMatterLamp', args)
  },

  getApplicationList(args) {
    return request.doGet('/node/getApplicationList', args)
  },

  downloadTemplate(args) {
    return request.doDownload('/node/downloadTemplate', args)
  }

}

